<!DOCTYPE html>
<!--
 * Copyright (c) 2010 The Chromium Authors. All rights reserved.  Use of this
 * source code is governed by a BSD-style license that can be found in the
 * LICENSE file.
-->
<html>
<head>
<script src="js/config.js" type="text/javascript"></script>
<script src="js/api.js" type="text/javascript"></script>
<script>

chrome.experimental.webNavigation.onBeforeNavigate.addListener(function(obj){
	var url=obj.url.slice(7);
	url=url.substr(0,url.length-1);
	var sUrl=api.nosql.get(BUCKET_NAME,url);
	if(sUrl)chrome.tabs.update(obj.tabId,{url:sUrl});
});

</script>
</head>
</html>